-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
docs(js): Add docs for strictTraceContinuation
and orgId
#14459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
Bundle ReportChanges will increase total bundle size by 10.75kB (0.05%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: sentry-docs-client-array-pushAssets Changed:
view changes for bundle: sentry-docs-server-cjsAssets Changed:
|
<SdkOption name="orgId" type='`${number}` | number'> | ||
|
||
The organization ID for your Sentry project. | ||
|
||
The SDK will try to extract the organization ID from the DSN. If it cannot be found, or if you need to override it, | ||
you can provide the ID with this option. The organization ID is used for trace propagation and for features like `strictTraceContinuation`. | ||
|
||
</SdkOption> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As stated in the PR description: I am not 100% sure where we should put orgId
in the options hierarchy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's fine. Or move it below DSN.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree!
Here are my thoughts:
A more sustainable approach (for example, in the future, this ID could be used in other features?) might be to place it under "Core Options", under DSN. Then, to highlight that only specific features use this option, you could put the respective sentences ("The organization ID is used for ...") into an Alert (info). And then link orgId
in the strictTraceContinuation
option so users don't have to search for it.
<SdkOption name="orgId" type='`${number}` | number'> | ||
|
||
The organization ID for your Sentry project. | ||
|
||
The SDK will try to extract the organization ID from the DSN. If it cannot be found, or if you need to override it, | ||
you can provide the ID with this option. The organization ID is used for trace propagation and for features like `strictTraceContinuation`. | ||
|
||
</SdkOption> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's fine. Or move it below DSN.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! ☀️
I added a few suggestions (mostly the same because of the repeating content :) )
<SdkOption name="orgId" type='`${number}` | number'> | ||
|
||
The organization ID for your Sentry project. | ||
|
||
The SDK will try to extract the organization ID from the DSN. If it cannot be found, or if you need to override it, | ||
you can provide the ID with this option. The organization ID is used for trace propagation and for features like `strictTraceContinuation`. | ||
|
||
</SdkOption> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree!
Here are my thoughts:
A more sustainable approach (for example, in the future, this ID could be used in other features?) might be to place it under "Core Options", under DSN. Then, to highlight that only specific features use this option, you could put the respective sentences ("The organization ID is used for ...") into an Alert (info). And then link orgId
in the strictTraceContinuation
option so users don't have to search for it.
The organization ID for your Sentry project. | ||
|
||
The SDK will try to extract the organization ID from the DSN. If it cannot be found, or if you need to override it, | ||
you can provide the ID with this option. The organization ID is used for trace propagation and for features like `strictTraceContinuation`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can provide the ID with this option. The organization ID is used for trace propagation and for features like `strictTraceContinuation`. | |
you can provide the ID with this option. The organization ID is used for trace propagation and features like `strictTraceContinuation`. |
_Available since SDK version 10_ | ||
|
||
When your application receives requests, they might include `sentry-trace` and `baggage` headers from an upstream service that is also using Sentry. | ||
By default, the SDK will continue the trace from the incoming headers. This can be undesirable if the requests are from a third-party service, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By default, the SDK will continue the trace from the incoming headers. This can be undesirable if the requests are from a third-party service, | |
By default, the SDK will continue the trace from these incoming headers. However, this behavior can be undesirable if the requests are from a third-party service, |
By default, the SDK will continue the trace from the incoming headers. This can be undesirable if the requests are from a third-party service, | ||
as it can lead to unwanted traces, increased billing, and skewed performance data. | ||
|
||
To prevent this, you can enable `strictTraceContinuation`. When this option is set to `true`, the SDK checks the incoming request for Sentry trace information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To prevent this, you can enable `strictTraceContinuation`. When this option is set to `true`, the SDK checks the incoming request for Sentry trace information. | |
To prevent this, you can enable `strictTraceContinuation`. When this option is set to `true`, the SDK checks the incoming request for Sentry trace information and only continues the trace if it belongs to the same Sentry organization. |
as it can lead to unwanted traces, increased billing, and skewed performance data. | ||
|
||
To prevent this, you can enable `strictTraceContinuation`. When this option is set to `true`, the SDK checks the incoming request for Sentry trace information. | ||
It only continues the trace if it belongs to the same Sentry organization. Otherwise, it starts a new trace. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It only continues the trace if it belongs to the same Sentry organization. Otherwise, it starts a new trace. | |
Otherwise, it starts a new trace. |
platform-includes/distributed-tracing/how-to-use/javascript.solidstart.mdx
Outdated
Show resolved
Hide resolved
platform-includes/distributed-tracing/how-to-use/javascript.solidstart.mdx
Outdated
Show resolved
Hide resolved
platform-includes/distributed-tracing/how-to-use/javascript.sveltekit.mdx
Outdated
Show resolved
Hide resolved
platform-includes/distributed-tracing/how-to-use/javascript.sveltekit.mdx
Outdated
Show resolved
Hide resolved
platform-includes/distributed-tracing/how-to-use/javascript.sveltekit.mdx
Outdated
Show resolved
Hide resolved
## DESCRIBE YOUR PR Docs for `strictTraceContinuation` and `orgId` ([related PR](getsentry/sentry-javascript#16313)). I'm not 100% sure where I should put the `orgId` as it does not 100% fit into the "Tracing Options" section but it's currently only used for tracing. closes getsentry/sentry-javascript#16308 ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. - [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE --> - [ ] Other deadline: <!-- ENTER DATE HERE --> - [ ] None: Not urgent, can wait up to 1 week+ ## SLA - Teamwork makes the dream work, so please add a reviewer to your PRs. - Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it. Thanks in advance for your help! ## PRE-MERGE CHECKLIST *Make sure you've checked the following before merging your changes:* - [ ] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs)
DESCRIBE YOUR PR
Docs for
strictTraceContinuation
andorgId
(related PR).I'm not 100% sure where I should put the
orgId
as it does not 100% fit into the "Tracing Options" section but it's currently only used for tracing.closes getsentry/sentry-javascript#16308
IS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs to go live.
SLA
Thanks in advance for your help!
PRE-MERGE CHECKLIST
Make sure you've checked the following before merging your changes: